# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: csslayer <wengxt AT gmail com>

pkgname=libime
pkgver=1.1.3
pkgrel=1
pkgdesc="A library to support generic input method implementation"
arch=('loong64' 'x86_64')
url="https://github.com/fcitx/libime"
license=('GPL')
depends=('boost-libs' 'fcitx5')
makedepends=('boost' 'extra-cmake-modules' 'ninja' 'python')
source=("https://download.fcitx-im.org/fcitx5/libime/libime-${pkgver}_dict.tar.xz"{,.sig})
sha512sums=('5079721651df334292fbcc6275ded55d41c6380183ef5487be558e93b551a6a6d651fb0fa0456c1d40ffdae432bf51375058fdcf631ea8a93c8751530642fc92'
            'SKIP')
validpgpkeys=('2CC8A0609AD2A479C65B6D5C8E8B898CBF2412F9') # Weng Xuetian <wengxt@gmail.com>

build(){
  cd $pkgname-$pkgver

  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib .
  ninja
}

check() {
  cd $pkgname-$pkgver
  ninja test
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" ninja install
}
